<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>SSM</h1>
<%--查询全部--%>
<h2>
    <a href="${pageContext.request.contextPath}/student/findAll">查询全部</a>
</h2>
<%--新增--%>
    <form action="${pageContext.request.contextPath}/student/add" method="post">
        <input type="number" name="id" placeholder="请输入id">
        <input type="text" name="name" placeholder="请输入姓名">
        <input type="text" name="sex" placeholder="请输入性别">
        <input type="text" name="address" placeholder="请输入地址">
        <input type="number" name="major_id" placeholder="请输入专业id">
        <input type="submit" value="新增">
    </form>

        <br>
    <%--通过id修改--%>
        <form action="${pageContext.request.contextPath}/student/updateById" method="post">
            <input type="number" name="id" placeholder="请输入id">
            <input type="text" name="name" placeholder="请输入姓名">
            <input type="text" name="sex" placeholder="请输入性别">
            <input type="text" name="address" placeholder="请输入地址">
            <input type="number" name="major_id" placeholder="请输入专业id">
            <input type="submit" value="修改">
        </form>

    <%--通过id删除--%>
    <form action="${pageContext.request.contextPath}/student/deleteById" method="post">
        <input type="text" name="id" placeholder="请输入id">
        <input type="submit" value="删除">
    </form>

    <%--通过id查询--%>
    <form action="${pageContext.request.contextPath}/student/findById" method="post">
        <input type="number" name="id" placeholder="请输入id">
        <input type="submit" value="查询">
    </form>

    <%--分页查询--%>
    <form action="${pageContext.request.contextPath}/student/findByPage" method="post">
        <input type="number" name="page" placeholder="请输入页数">
        <input type="number" name="size" placeholder="请输入每页显示条数">
        <input type="submit" value="查询">
    </form>

</body>
</html>
